const Sequelize = require('sequelize');
const sequelize = new Sequelize('pet_mall_db', 'root', 'wang6688', {
    host: 'localhost',
    dialect: 'mysql'
});

const Product = sequelize.define('product', {
    id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    name: {
        type: Sequelize.STRING,
        allowNull: false
    },
    price: {
        type: Sequelize.FLOAT,
        allowNull: false
    },
    description: {
        type: Sequelize.TEXT
    }
});

module.exports = Product;